package com.xlabs.server;

import com.google.appengine.api.users.UserService;
import com.google.appengine.api.users.UserServiceFactory;
import com.google.gwt.user.server.rpc.RemoteServiceServlet;
import com.xlabs.client.UserAccountService;

/**
 * UserAccountServiceImpl class.
 */
public class UserAccountServiceImpl extends RemoteServiceServlet implements UserAccountService {
    /**
     * Gets user's userName.
     * @return user's username.
     */
    public String getNickName() {
        UserService userService = UserServiceFactory.getUserService();
        return userService.getCurrentUser().getNickname();
    }
}